package com.china.fragment;

import android.content.Intent;
import android.view.View;
import android.widget.LinearLayout;

import com.china.base.BaseFragment;
import com.china.osourcechina.Event_Activity;
import com.china.osourcechina.Finduser_Activity;
import com.china.osourcechina.Friends_Activity;
import com.china.osourcechina.R;
import com.china.osourcechina.Scan_Activity;
import com.china.osourcechina.Shake_Activity;

/**
 * Created by Administrator on 2016/5/7.
 */
public class Foundfragment extends BaseFragment{


    @Override
    protected int getLoadViewId() {
        return R.layout.fragment_found;
    }

    @Override
    protected void initView(View view) {
        LinearLayout friends= (LinearLayout) view.findViewById(R.id.friends);
        LinearLayout finduser= (LinearLayout) view.findViewById(R.id.finduser);
        LinearLayout event= (LinearLayout) view.findViewById(R.id.event);
        LinearLayout scan= (LinearLayout) view.findViewById(R.id.scan);
        LinearLayout shake= (LinearLayout) view.findViewById(R.id.shake);

        friends.setOnClickListener(new OnclickList());
        finduser.setOnClickListener(new OnclickList());
        event.setOnClickListener(new OnclickList());
        scan.setOnClickListener(new OnclickList());
        shake.setOnClickListener(new OnclickList());

    }

    @Override
    protected void initData() {

    }

    private class OnclickList implements View.OnClickListener {
        @Override
        public void onClick(View v) {
            switch (v.getId()){
                case  R.id.friends :
                    Intent intent =new Intent(getActivity(),Friends_Activity.class);
                    startActivity(intent);
                    break;
                case  R.id.finduser :
                    Intent intents =new Intent(getActivity(),Finduser_Activity.class);
                    startActivity(intents);
                    break;
                case  R.id.event :
                    Intent intents_ =new Intent(getActivity(),Event_Activity.class);
                    startActivity(intents_);
                    break;
                case  R.id.scan :
                    Intent intents_s =new Intent(getActivity(),Scan_Activity.class);
                    startActivity(intents_s);
                    break;
                case  R.id.shake :
                    Intent intents_h =new Intent(getActivity(),Shake_Activity.class);
                    startActivity(intents_h);
                    break;
            }
        }
    }
}
